home *** CD-ROM | disk | FTP | other *** search
- Path: uhura.phoenix.net!usenet
- From: brucew@phoenix.net (Bruce Wedding)
- Newsgroups: comp.lang.c,comp.unix.programmer
- Subject: Re: Q: '\n' character
- Date: Wed, 17 Apr 1996 22:57:14 GMT
- Organization: BranPaul Systems
- Message-ID: <4l3ta3$c08@uhura.phoenix.net>
- References: <4kj66f$k0o@ren.cei.net> <1996Apr11.192937.25676@sq.com> <829396473snz@genesis.demon.co.uk> <4kpd2g$eeb@masala.cc.uh.edu>
- NNTP-Posting-Host: dial22.phoenix.net
- X-Newsreader: Moe's Newsreader
-
- In comp.lang.c
-
- >: >This leads to the alternative approach:
- >: >
- >: > ptr = strchr (buffer, '\n'); /* or strrchr() */
- >: > if (ptr) *ptr = '\0';
-
- Which is a lot of code when this will do the same thing:
-
- strtok( ptr, "\n");
-
- Bruce
-
-